home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Developer Utilities / Installer 4.0GM SDK / Script Examples / Split File Copy / Split File Copy.r < prev    next >
Encoding:
Text File  |  1994-02-10  |  2.9 KB  |  157 lines  |  [TEXT/MPS ]

  1. #include "InstallerTypes.r"
  2.  
  3. //  This Split File Copy Script is to demonstate how one can have the Installer
  4. //  build the target file from multiple source files.  In this example the Read Me
  5. //  file has been split into 6 different source files, 3 for each fork.  In addition
  6. //  the resource fork source data is located in the data fork to avoid problems
  7. //  with an incomplete resource fork.
  8.  
  9. //  Please take note that the target part sizes in the source parts list MUST be
  10. //  exact and in the order they are to be built in.  For this example, the source
  11. //  disk order has been reversed to demonstate the flexibiliity of the Installer
  12. //  in assembling the target file together.
  13.  
  14.  
  15. resource 'inpk' (100) {
  16.     format0 {
  17.         showsOnCustom,
  18.         removable,
  19.         dontForceRestart,
  20.         0,
  21.         0,
  22.         "Copy File Read Me from split source files....",
  23.         {    'infa', 1000,
  24.             'infa', 2000    },
  25.         }
  26.     };
  27.  
  28. resource 'infa' (1000) {
  29.     format1 {
  30.         deleteWhenRemoving,
  31.         deleteWhenInstalling,
  32.         copy,
  33.         dontIgnoreLockedFile,
  34.         dontSetFileLocked,
  35.         useVersProcToCompare,
  36.         srcNeedExist,
  37.         rsrcForkInRsrcFork,
  38.         leaveAloneIfNewer,
  39.         updateExisting,
  40.         copyIfNewOrUpdate,
  41.         noRsrcFork,
  42.         dataFork,                    //  only copy the data fork here.
  43.         0,
  44.         0x0,
  45.         10000,
  46.         {    21001, 0, 0,            //  parts list, with exact target part sizes.
  47.             21002, 0, 0,
  48.             21003, 0, 0    },
  49.         0x0,
  50.         0,
  51.         0,
  52.         "Read Me - data fork"
  53.         }
  54.     };
  55.  
  56. resource 'infa' (2000) {
  57.     format1 {
  58.         deleteWhenRemoving,
  59.         deleteWhenInstalling,
  60.         copy,
  61.         dontIgnoreLockedFile,
  62.         dontSetFileLocked,
  63.         useVersProcToCompare,
  64.         srcNeedExist,
  65.         rsrcForkInDataFork,
  66.         leaveAloneIfNewer,
  67.         updateExisting,
  68.         copyIfNewOrUpdate,
  69.         rsrcFork,                    //  only copy the resource fork here.
  70.         noDataFork,
  71.         0,
  72.         0x0,
  73.         10000,
  74.         {    22001, 0, 0,            //  parts list, with exact target part sizes.
  75.             22002, 0, 0,
  76.             22003, 0, 0    },
  77.         0x0,
  78.         0,
  79.         0,
  80.         "Read Me - resource fork"
  81.         }
  82.     };
  83.  
  84. resource 'infs' (10000) {
  85.     'ttro',
  86.     'ttxt',
  87.     0x0,
  88.     noSearchForFile,
  89.     TypeCrMustMatch,
  90.     ":Read Me"
  91.     };
  92.  
  93. resource 'infs' (21001) {
  94.     'TEXT',
  95.     'MPS ',
  96.     0x1,
  97.     noSearchForFile,
  98.     TypeCrMustMatch,
  99.     "Source Disk 1:Read Me.dataFork1"
  100.     };
  101.  
  102. resource 'infs' (21002) {
  103.     'TEXT',
  104.     'MPS ',
  105.     0x1,
  106.     noSearchForFile,
  107.     TypeCrMustMatch,
  108.     "Source Disk 2:Read Me.dataFork2"
  109.     };
  110.  
  111. resource 'infs' (21003) {
  112.     'TEXT',
  113.     'MPS ',
  114.     0x1,
  115.     noSearchForFile,
  116.     TypeCrMustMatch,
  117.     "Source Disk 3:Read Me.dataFork3"
  118.     };
  119.  
  120. resource 'infs' (22001) {
  121.     'TEXT',
  122.     'MPS ',
  123.     0x1,
  124.     noSearchForFile,
  125.     TypeCrMustMatch,
  126.     "Source Disk 4:Read Me.rsrcFork1"
  127.     };
  128.  
  129. resource 'infs' (22002) {
  130.     'TEXT',
  131.     'MPS ',
  132.     0x1,
  133.     noSearchForFile,
  134.     TypeCrMustMatch,
  135.     "Source Disk 5:Read Me.rsrcFork2"
  136.     };
  137.  
  138. resource 'infs' (22003) {
  139.     'TEXT',
  140.     'MPS ',
  141.     0x1,
  142.     noSearchForFile,
  143.     TypeCrMustMatch,
  144.     "Source Disk 6:Read Me.rsrcFork3"
  145.     };
  146.     
  147. resource 'indo' (1) {
  148.     format1 {{
  149.         kExpectFloppyDisk, "Source Disk 6",
  150.         kExpectFloppyDisk, "Source Disk 5",
  151.         kExpectFloppyDisk, "Source Disk 4",
  152.         kExpectFloppyDisk, "Source Disk 3",
  153.         kExpectFloppyDisk, "Source Disk 2",
  154.         kExpectFloppyDisk, "Source Disk 1",
  155.         }}
  156.     };
  157.